package wyn.service.impl;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import wyn.dao.UserDaoI;
import wyn.entity.SysName;
import wyn.service.UserServiceI;

import java.io.Serializable;

/**
 * Created by 王亚楠 on 2016/2/21.
 */
@Service("userService")
public class UserServiceImpl implements UserServiceI {

    public static final Logger logger = Logger.getLogger(UserServiceImpl.class);

    private UserDaoI dao;

    public UserDaoI getDao() {
        return dao;
    }

    @Autowired
    public void setDao(UserDaoI dao) {
        this.dao = dao;
    }

    public void test() {
        logger.info("测试log4j");
    }

    public Serializable save(SysName user) {
        return dao.save(user);
    }
}
